package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Menu;

import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author jshstart
 * @creat 2020-11-23 9:42
 */
public interface MenuMapper extends BaseMapper<Menu> {
    @Select("select * from t_menu t where t.pid = 0")
    List<Menu> findParent();
    @Select("select * from t_menu t where t.pid = #{id}")
    List<Menu> findChildren(Long id);
}

